﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 修改人：x
 * 时间：
 * 修改说明：
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>using System;
using Microsoft.AspNetCore.Mvc;
using seejee_Backendium.Core.Interfaces;
using seejee_Backendium.Core.Models;
using seejee_Backendium.Data.Repositores;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace seejee_Backendium.Data.Services
{
    public class ViewManagementService : IViewManagementService
    {
        private readonly ViewManagementRepository _viewManagementRepository;

        public ViewManagementService(ViewManagementRepository viewManagementRepository)
        {
            _viewManagementRepository = viewManagementRepository;
        }
        public async Task<bool> UpdateMenuSort(List<MenuSortDTO> sortDtos) => _viewManagementRepository.UpdateMenuSort(sortDtos);
        public PagedResult<BIMenuDTO> GetBIMenu(int pageIndex, int pageSize, string keyword) => _viewManagementRepository.GetBIMenu(pageIndex, pageSize, keyword);
        public List<CustomerDTO> GetBICustomer() => _viewManagementRepository.GetBICustomer();
        public Task<IEnumerable<MenuAndViewDTO>> GetAllViewName(int? iCusID) => _viewManagementRepository.GetAllViewName(iCusID);
        public Task<MenuInsertDTO> GetView(int id) => _viewManagementRepository.GetView(id);
        public bool InsertMenu(MenuInsertDTO menus) => _viewManagementRepository.InsertMenu(menus);
        public bool UpdateView(int id, MenuInsertDTO menu) => _viewManagementRepository.UpdateView(id, menu);
        public bool DeleteView(int id) => _viewManagementRepository.DeleteView(id);
        public bool DeleteView(string categoryName,string viewName) => _viewManagementRepository.DeleteView(categoryName, viewName);
        public bool DeleteViews(string viewName) => _viewManagementRepository.DeleteViews(viewName);

    }
}
